import { request } from '../utils/request';
const getRightConfigPagination = (
  page: number,
  pageSize: number,
  keyword: string
) => {
  return request.get('/rightConfig/pagination', {
    page: page,
    limit: pageSize,
    key: keyword,
  });
};

const addRightConfig = (data: any) => {
  return request.post('/rightConfig/add', data);
};

const updateRightConfig = (params: any) => {
  return request.post('/rightConfig/update', params);
};

const getRightConfigDetail = (id: number) => {
  return request.get('/rightConfig/detail', { id });
};

const deleteRightConfig = (id: number) => {
  return request.post('/rightConfig/delete', { id });
};

export {
  getRightConfigDetail,
  getRightConfigPagination,
  addRightConfig,
  updateRightConfig,
  deleteRightConfig,
};
